#!/usr/bin/env python2.7
#-*-coding:utf-8-*-

def break_words(stuff):
	"""this function will break up words for us."""
	words=stuff.split(' ')
	return words

def sort_words(stuff):
	"""sorts the words"""
	return sorted(stuff)

def print_first_word(stuff):
	"""prints the first word after it pops off"""
	word=stuff.pop(0)
	return word

def print_last_word(stuff):
	"""print the last word after it pops off"""
	word=stuff.pop(-1)
	return word

def print_first_and_last(sentence):
	"""print the first and last words of sentences"""
	words=break_words(sentence)
	print_first_word(words)
	print_last_word(words)

def print_first_and_last_sorted(sentence):
	"""print the first and last word of sorted sentences"""
	words=sort_words(sentence)
	print_first_word(words)
	print_last_word(words)
